package com.xx.eshop.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xx.eshop.dao.ProductImageDao;
import com.xx.eshop.entity.ProductImage;
import com.xx.eshop.service.ProductImageService;

@Service
public class ProductImageServiceImpl implements ProductImageService{

	@Autowired
	private ProductImageDao productImageDao;
	
	@Override
	public void save(ProductImage img) {
		productImageDao.save(img);
		
	}

	@Override
	public void update(ProductImage img) {
		productImageDao.update(img);
	}

	@Override
	public void delete(int product_id) {
		productImageDao.delete(product_id);
	}

	@Override
	public List<ProductImage> findByProductId(int product_id){
		return productImageDao.findByProductId(product_id);
	}

}
